package com.qyhl.webtv.commonlib.entity.home;

import android.text.TextUtils;

import com.qyhl.webtv.basiclib.utils.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Created by qyhl on 2017/11/10.
 */

public class NewsBean implements Serializable {
    public String RoomId;
    public String HitCount;
    public String Logo;
    public String Type;
    public String ID;
    public String GoodViewCount;
    public String PublishDate;
    public String Title;
    public List<Images> imagess;
    public String CatalogID;
    public int counts;
    public String livetype;
    public String RedirectURL;
    public String source;
    public String link;
    public String duration;//时长
    public String Summary;//摘要
    public String clickCount;
    public List<Tag> tags;
    public String zccollectID;
    public String PluralPicsFlag;//普通新闻样式 0 默认  1 三图  2大图

    public int commonStyle = 1;
    public int videoStyle = 1;
    public String comment;
    public String CommentCount;//评论数
    private String CatalogName;

    public String getCatalogName() {
        return CatalogName;
    }

    public void setCatalogName(String catalogName) {
        CatalogName = catalogName;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public int getPluralPicsFlag() {
        if (TextUtils.isEmpty(PluralPicsFlag)) {
            return 0;
        }
        return Integer.parseInt(PluralPicsFlag);
    }

    public void setPluralPicsFlag(String pluralPicsFlag) {
        PluralPicsFlag = pluralPicsFlag;
    }

    public String getZccollectID() {
        return zccollectID;
    }

    public void setZccollectID(String zccollectID) {
        this.zccollectID = zccollectID;
    }

    public int getCommonStyle() {
        return commonStyle;
    }

    public void setCommonStyle(int commonStyle) {
        this.commonStyle = commonStyle;
    }

    public int getVideoStyle() {
        return videoStyle;
    }

    public void setVideoStyle(int videoStyle) {
        this.videoStyle = videoStyle;
    }

    public String getClickCount() {
        return clickCount;
    }

    public void setClickCount(String clickCount) {
        this.clickCount = clickCount;
    }

    public List<Tag> getTags() {
        return tags;
    }

    public void setTags(List<Tag> tags) {
        this.tags = tags;
    }

    public String getSummary() {
        return Summary;
    }

    public void setSummary(String summary) {
        Summary = summary;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getRedirectURL() {
        return RedirectURL;
    }

    public void setRedirectURL(String redirectURL) {
        RedirectURL = redirectURL;
    }

    public String getLivetype() {
        return livetype;
    }

    public void setLivetype(String livetype) {
        this.livetype = livetype;
    }

    public String getRoomId() {
        return RoomId;
    }

    public void setRoomId(String roomId) {
        RoomId = roomId;
    }

    public String getCatalogID() {
        return CatalogID;
    }

    public void setCatalogID(String catalogID) {
        CatalogID = catalogID;
    }

    public int getCounts() {
        return counts;
    }

    public void setCounts(int counts) {
        this.counts = counts;
    }

    public String getType() {
        return Type;
    }

    public void setType(String type) {
        Type = type;
    }

    public String getHitCount() {
        return HitCount;
    }

    public void setHitCount(String hitCount) {
        HitCount = hitCount;
    }

    public String getLogo() {
        return Logo;
    }

    public void setLogo(String logo) {
        Logo = logo;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public String getGoodViewCount() {
        return GoodViewCount;
    }

    public void setGoodViewCount(String goodViewCount) {
        GoodViewCount = goodViewCount;
    }

    public int getCommentCount() {
        if (StringUtils.isNotEmpty(CommentCount)) {
            return Integer.parseInt(CommentCount);
        } else {
            return 0;
        }
    }

    public void setCommentCount(String commentCount) {
        CommentCount = commentCount;
    }

    public String getPublishDate() {
        return PublishDate;
    }

    public void setPublishDate(String publishDate) {
        PublishDate = publishDate;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String title) {
        Title = title;
    }

    public List<Images> getImagess() {
        return imagess;
    }

    public void setImagess(List<Images> imagess) {
        this.imagess = imagess;
    }

    public class Images implements Serializable {
        public String imageUrlString;

        public String getImageUrlString() {
            return imageUrlString;
        }

        public void setImageUrlString(String imageUrlString) {
            this.imageUrlString = imageUrlString;
        }

        @Override
        public String toString() {
            return "Images{" +
                    "imageUrlString='" + imageUrlString + '\'' +
                    '}';
        }
    }

    public class Tag implements Serializable {
        public int id;
        public int siteId;
        public String tagName;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getSiteId() {
            return siteId;
        }

        public void setSiteId(int siteId) {
            this.siteId = siteId;
        }

        public String getTagName() {
            return tagName;
        }

        public void setTagName(String tagName) {
            this.tagName = tagName;
        }

        @Override
        public String toString() {
            return "Tag{" +
                    "id=" + id +
                    ", siteId=" + siteId +
                    ", tagName='" + tagName + '\'' +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "NewsBean{" +
                "RoomId='" + RoomId + '\'' +
                ", HitCount='" + HitCount + '\'' +
                ", Logo='" + Logo + '\'' +
                ", Type='" + Type + '\'' +
                ", ID='" + ID + '\'' +
                ", GoodViewCount='" + GoodViewCount + '\'' +
                ", PublishDate='" + PublishDate + '\'' +
                ", Title='" + Title + '\'' +
                ", imagess=" + imagess +
                ", CatalogID='" + CatalogID + '\'' +
                ", counts=" + counts +
                ", livetype='" + livetype + '\'' +
                ", RedirectURL='" + RedirectURL + '\'' +
                ", source='" + source + '\'' +
                ", link='" + link + '\'' +
                ", duration='" + duration + '\'' +
                ", Summary='" + Summary + '\'' +
                ", clickCount='" + clickCount + '\'' +
                ", tags=" + tags +
                ", commonStyle=" + commonStyle +
                ", videoStyle=" + videoStyle +
                '}';
    }
}
